/*    */ package client.inventory;
/*    */ 
/*    */ import constants.ItemConstants;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ModifyInventory
/*    */ {
/*    */   private final int mode;
/*    */   private Item item;
/*    */   private short oldPos;
/*    */   private short indicator;
/*    */   private boolean switchSrcDst = false;
/*    */   
/*    */   public ModifyInventory(int mode, Item item) {
/* 33 */     this.mode = mode;
/* 34 */     this.item = item.copy();
/*    */   }
/*    */   
/*    */   public ModifyInventory(int mode, Item item, short oldPos) {
/* 38 */     this.mode = mode;
/* 39 */     this.item = item.copy();
/* 40 */     this.oldPos = oldPos;
/*    */   }
/*    */   
/*    */   public ModifyInventory(int mode, Item item, short oldPos, short indicator, boolean switchSrcDst) {
/* 44 */     this.mode = mode;
/* 45 */     this.item = item.copy();
/* 46 */     this.oldPos = oldPos;
/* 47 */     this.indicator = indicator;
/* 48 */     this.switchSrcDst = switchSrcDst;
/*    */   }
/*    */   
/*    */   public int getMode() {
/* 52 */     if ((getInventoryType() == 2 || getInventoryType() == 3 || getInventoryType() == 4) && this.item.getPosition() > 10000) {
/* 53 */       switch (this.mode) {
/*    */         case 0:
/* 55 */           return 9;
/*    */         case 1:
/* 57 */           return 6;
/*    */         case 2:
/* 59 */           return 5;
/*    */         case 3:
/* 61 */           return 7;
/*    */       } 
/*    */     }
/* 64 */     return this.mode;
/*    */   }
/*    */   
/*    */   public int getInventoryType() {
/* 68 */     return ItemConstants.getInventoryType(this.item.getItemId()).getType();
/*    */   }
/*    */   
/*    */   public short getPosition() {
/* 72 */     return this.item.getPosition();
/*    */   }
/*    */   
/*    */   public short getOldPosition() {
/* 76 */     return this.oldPos;
/*    */   }
/*    */   
/*    */   public short getIndicator() {
/* 80 */     return this.indicator;
/*    */   }
/*    */   
/*    */   public boolean switchSrcDst() {
/* 84 */     return this.switchSrcDst;
/*    */   }
/*    */   
/*    */   public short getQuantity() {
/* 88 */     return this.item.getQuantity();
/*    */   }
/*    */   
/*    */   public Item getItem() {
/* 92 */     return this.item;
/*    */   }
/*    */   
/*    */   public void clear() {
/* 96 */     this.item = null;
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\client\inventory\ModifyInventory.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */